﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Comissoes.Models.TransportadoresModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <%= ViewData["scripts"] %>
</head>
<body>
    <div class="cabecalho ui-state-highlight">
        <span class="icolst" />
        <span class="txt">
            <%= Html.Encode("Dados do Transportador") %>
        </span>
    </div>
    <form action="javascript:saveDialog('Transportadores', $('#COD_TRAN').val())">
        <fieldset class="container transparent">
            <label class="input160">
                <button class="diskcommand" type="submit"">Salvar</button>
                <% if (Model.transportador.COD_TRAN == 0)
                   { %>                    
                    <button class="closecommand" type="button" onclick="loadOption('/Transportadores/Index', true);">Cancelar</button>
                <% }
                   else
                   { %>
                    <button class="closecommand" type="button" onclick="loadOption('/Transportadores/Details/<%= Html.Encode(Model.transportador.COD_TRAN) %>', true);">Cancelar</button>
                <% } %>
            </label>
        </fieldset>
        <fieldset class="container field500 transparent">
            <% if (Model.transportador.COD_TRAN == 0)
               { %>
                <%= Html.Hidden("COD_TRAN", Model.transportador.COD_TRAN) %>
            <% }
               else
               { %>
                <%= Html.Label("COD_TRAN", "for60", "Código:")%>
                <%= Html.LabelInput(Html.TextBox("COD_TRAN", Model.transportador.COD_TRAN, new { readOnly = true }), "input80")%>
            <% } %>


            <%= Html.LabelInput(Html.CheckBox("ATIVO_TRAN", Model.transportador.ATIVO_TRAN == "A" || Model.transportador.ATIVO_TRAN == null), "Check") %>
            <%= Html.Label("ATIVO_TRAN", "for40", "Ativo") %>

            <% Html.RenderAction("Edit", "Pessoas", Model.transportador.PESSOAS); %>
        </fieldset>
    <% Html.EndForm(); %>
</body>
</html>